<template>
  <VChart ref="echartsRef" autoresize v-bind="$attrs" :initOptions="{renderer: 'svg'}"/>
</template>

<script setup lang="ts" name="Echarts">
import VChart from 'vue-echarts'
import { ref } from 'vue'
const echartsRef = ref()

//图表组件
import {PieChart ,LinesChart ,MapChart ,ScatterChart,LineChart,BarChart,PictorialBarChart } from 'echarts/charts'
//配置组件
import { LegendComponent,VisualMapComponent ,PolarComponent, TitleComponent, GridComponent,TooltipComponent} from 'echarts/components'
import {use} from 'echarts/core'
import {CanvasRenderer,SVGRenderer} from 'echarts/renderers'
use([CanvasRenderer,MapChart ,VisualMapComponent,LinesChart,PolarComponent,ScatterChart,SVGRenderer,PictorialBarChart ,BarChart,LineChart, PieChart, GridComponent,TitleComponent, TooltipComponent, LegendComponent])

defineExpose({
  echartsRef
})
</script>

<style scoped lang="less">

</style>
